import request from '@/utils/requestH2'

// 用户账号密码登录
export function loginApi(data) {
  return request({
    url: '/admin/login/userLogin',
    method: 'POST',
    data
  })
}

// 获取权限页面
export function getUserInfoApi(userId) {
  return request({
    url: '/admin/login/selUserPage',
    method: 'GET',
    params: {
      userId
    }
  })
}

// 是否已经修改密码
export function selUserAuditApi(userId) {
  return request({
    url: '/admin/login/selUserAudit',
    method: 'GET',
    params: {
      userId
    }
  })
}

// 修改用户密码
export function updatePasswordByIdApi(data) {
  return request({
    url: '/admin/login/updatePasswordById',
    method: 'PUT',
    data
  })
}

// 手机号跳转登录
export function mobileLoginApi(data) {
  return request({
    url: '/admin/login/mobileLogin',
    method: 'POST',
    data
  })
}

